<?php
/**
include('globalFunctions.php');

#var_dump($_SERVER);
$str = "!%40%23%24%25%5e%26*()%7b%7d%7c_%2b%22%3a%3e%3c%3f%7e%601234567890-%3d%5b%5d%3b'%2f.%2cabcdefg===hijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
echo  rawurlencode($str);
$a =  explode('===',htmlspecialchars(rawurldecode(rawurlencode($str))) , 2);
var_dump($a);
**/
echo ceil(4);
echo ceil(4.3);
die;


$body ="<?xml version=\"1.0\" encoding=\"utf-8\" ?>
<entry>
  <tel>phone_number_hash</tel>
  <dev>device_id</dev>
  <model>model_name</model>
  <max w=\"800\" h=\"600\"  />
  <def w=\"80\" h=\"60\" q=\"1\" />
  <min w=\"8\" h=\"6\" q=\"3\" />
</entry>
";

$xmlparser = simplexml_load_string($body);
if(!$xmlparser){
	header(error_xml_structure);
	exit;
}
echo "aaa";
$tel = strval($xmlparser->tel);  //get the dpf phone_number_hash
$dev = strval($xmlparser->dev);  //get the dpf device_id
$model = strval($xmlparser->model);  //get the dpf model_name

if($xmlparser->max[0]){
	$arr = $xmlparser->max[0]->attributes();
	list($max_w,$max_h,$max_q) = array($arr["h"] , $arr["w"] , $arr["q"]);//get the dpf max w|h|q
}
if($xmlparser->min[0]){
	list($min_w,$min_h,$min_q) = $xmlparser->min[0]->attributes();  //get the dpf min w|h|q
}
if($xmlparser->def[0]){
	list($def_w,$def_h,$def_q) = $xmlparser->def[0]->attributes();  //get the dpf def w|h|q
}

echo $max_w." - ".$max_h." - ".$max_q;
?>